﻿namespace S.Archives.Read.Api.Dto
{
    public class SheepGenealogy
    {
        public int Key { get; set; }

        public string SheepEarTag { get; set; }

        public SheepGenealogy Father { get; set; }

        public SheepGenealogy Monther { get; set; }
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return false;
            }

            SheepGenealogy other = (SheepGenealogy)obj;
            return Key == other.Key && SheepEarTag == other.SheepEarTag;
        }

        public override int GetHashCode()
        {
            unchecked
            {
                int hash = 17;
                hash = hash * 23 + Key.GetHashCode();
                hash = hash * 23 + (SheepEarTag != null ? SheepEarTag.GetHashCode() : 0);
                return hash;
            }
        }
    }
}